import {
    Model,
    Table,
    PrimaryKey,
    AutoIncrement,
    Column,
    Sequelize,
    ForeignKey
} from "sequelize-typescript";
import OrganizationModel from './organization.model'

@Table({
    modelName: "activity"
})
export default class Activity extends Model<Activity> {
    @PrimaryKey
    @AutoIncrement
    @Column(Sequelize.INTEGER(64))
    activityId: number;

    @Column(Sequelize.STRING)
    activityName: string;

    @Column(Sequelize.STRING)
    activityItem: string;

    @Column(Sequelize.STRING)
    startTime: string;

    @Column(Sequelize.STRING)
    overTime: string;

    @ForeignKey(() => OrganizationModel)
    @Column(Sequelize.INTEGER(64))
    organizationId: number;
}